<template>
  <h1>a:{{a}}</h1>
  <h1>name:{{b.name}}</h1>
</template>
<script setup lang="ts" name="Count">
import {shallowRef,ref} from 'vue'

const a = shallowRef(1)
setTimeout(()=>{
  a.value = 2 //普通类型可以改变
},2000)

const b = shallowRef({name:'zll',age:10})
setTimeout(()=>{
  b.value.name = 'e' //对象类型不能改变 只跟踪引用值的变化，不关心值内部的属性变化
  b.value = {name:'zll33',age:10} //可以改变，引用值的地址发生了改变
},2000)
</script>
